package com.hznu.stmanage.serviceImpl;

import com.hznu.stmanage.dao.ResumeStudentMapper;
import com.hznu.stmanage.entity.ResumeStudent;
import com.hznu.stmanage.service.BaseService;
import com.hznu.stmanage.service.ResumeStudentService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by J_Vino on 16/3/6.
 */
@Transactional(rollbackFor = Exception.class)
@Service
public class ResumeStudentServiceImpl extends BaseService implements ResumeStudentService {

    ResumeStudentMapper resumeStudentMapper = null;
    public void setMapper()
    {
        if(resumeStudentMapper==null)
            resumeStudentMapper = getResumeStudentMapper();//1.获取相关mapper
    }
    public int deleteByPrimaryKey(Long id) {
        setMapper();
        return resumeStudentMapper.deleteByPrimaryKey(id);
    }

    public int insert(ResumeStudent record) {
        setMapper();
        return resumeStudentMapper.insert(record);
    }

    public int insertSelective(ResumeStudent record) {
        setMapper();
        return resumeStudentMapper.insertSelective(record);
    }

    public ResumeStudent selectByPrimaryKey(Long id) {
        setMapper();
        return resumeStudentMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(ResumeStudent record) {
        setMapper();
        return resumeStudentMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(ResumeStudent record) {
        setMapper();
        return resumeStudentMapper.updateByPrimaryKey(record);
    }
}
